using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;using Maxleaf.EDI.Domain.K3;

namespace Maxleaf.EDI.DataAccess.K3
{
    public class t_ItemDetailVMap : EntityTypeConfiguration<t_ItemDetailV>
    {
        public t_ItemDetailVMap()
        {
            // Primary Key
            this.HasKey(t => new { t.FDetailID, t.FItemClassID, t.FItemID });

            // Properties
            this.Property(t => t.FDetailID)
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.None);

            this.Property(t => t.FItemClassID)
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.None);

            this.Property(t => t.FItemID)
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.None);

            // Table & Column Mappings
            this.ToTable("t_ItemDetailV");
            this.Property(t => t.FDetailID).HasColumnName("FDetailID");
            this.Property(t => t.FItemClassID).HasColumnName("FItemClassID");
            this.Property(t => t.FItemID).HasColumnName("FItemID");
        }
    }
}
